﻿// MT380




using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.Collections.Generic;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category3
{
  public class MT380 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagSequenceDefinition U0002;
    private static SwiftTagDefinition U0003;
    private static SwiftTagSubItemDefinition U0004;
    private static SwiftTagDefinition U0005;
    private static SwiftTagSubItemDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagDefinition U0011;
    private static SwiftTagSubItemDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagSequenceDefinition U0014;
    private static SwiftTagDefinition U0015;
    private static SwiftTagSubItemDefinition U0016;
    private static SwiftTagChoiceDefinition U0017;
    private static SwiftTagDefinition U0018;
    private static SwiftTagSubItemDefinition U0019;
    private static SwiftTagSubItemDefinition U001A;
    private static SwiftTagDefinition U001B;
    private static SwiftTagSubItemDefinition U001C;
    private static SwiftTagSubItemDefinition U001D;
    private static SwiftTagSubItemDefinition U001E;
    private static SwiftTagDefinition U001F;
    private static SwiftTagSubItemDefinition U007F;
    private static SwiftTagSubItemDefinition U0080;
    private static SwiftTagDefinition U0081;
    private static SwiftTagSubItemDefinition U0082;
    private static SwiftTagDefinition U0083;
    private static SwiftTagSubItemDefinition U0084;
    private static SwiftTagSequenceDefinition U0086;
    private static SwiftTagDefinition U0087;
    private static SwiftTagSubItemDefinition U0088;
    private static SwiftTagDefinition U0089;
    private static SwiftTagSubItemDefinition U008A;
    private static SwiftTagSubItemDefinition U008B;
    private static SwiftTagChoiceDefinition U008C;
    private static SwiftTagDefinition U008D;
    private static SwiftTagSubItemDefinition U008E;
    private static SwiftTagSubItemDefinition U008F;
    private static SwiftTagDefinition U0090;
    private static SwiftTagSubItemDefinition U0091;
    private static SwiftTagSubItemDefinition U0092;
    private static SwiftTagSubItemDefinition U0093;
    private static SwiftTagSubItemDefinition U0094;
    private static SwiftTagDefinition U0095;
    private static SwiftTagSubItemDefinition U0096;
    private static SwiftTagSubItemDefinition U0097;
    private static SwiftTagSubItemDefinition U0098;
    private static SwiftTagSubItemDefinition U0099;
    private static SwiftTagDefinition U009A;
    private static SwiftTagSubItemDefinition U009B;
    private static SwiftTagSubItemDefinition U009C;
    private static SwiftTagSequenceDefinition U009D;
    private static SwiftTagDefinition U009E;
    private static SwiftTagSubItemDefinition U009F;
    private static SwiftTagChoiceDefinition U0001U0002;
    private static SwiftTagDefinition U0002U0002;
    private static SwiftTagSubItemDefinition U0003U0002;
    private static SwiftTagSubItemDefinition U0004U0002;
    private static SwiftTagDefinition U0005U0002;
    private static SwiftTagSubItemDefinition U0006U0002;
    private static SwiftTagSubItemDefinition U0007U0002;
    private static SwiftTagDefinition U0008U0002;
    private static SwiftTagSubItemDefinition U000EU0002;
    private static SwiftTagSubItemDefinition U000FU0002;
    private static SwiftTagSubItemDefinition U0010U0002;
    private static SwiftTagDefinition U0011U0002;
    private static SwiftTagSubItemDefinition U0012U0002;
    private static SwiftTagSubItemDefinition U0013U0002;
    private static SwiftTagDefinition U0014U0002;
    private static SwiftTagSubItemDefinition U0015U0002;
    private static SwiftTagDefinition U0016U0002;
    private static SwiftTagSubItemDefinition U0017U0002;

    [Description("General Information")]
    public MT380.SequenceAClass SequenceA
    {
      get
      {
        return new MT380.SequenceAClass((SwiftElement) this, 0, false);
      }
    }

    [Description("FX Order Details")]
    public MT380.SequenceBClass SequenceB
    {
      get
      {
        return new MT380.SequenceBClass((SwiftElement) this, 0, false);
      }
    }

    public MT380()
      : base(true)
    {
    }

    public MT380(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT380.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT380.MessageDefinition = new SwiftMessageDefinition("MT380", "");
      MT380.U0002 = new SwiftTagSequenceDefinition("SequenceA", "General Information");
      MT380.U0003 = new SwiftTagDefinition("StartOfBlock_A_16R", "Start Of Block");
      MT380.U0003.TagName = ":16R:GENL";
      MT380.U0004 = new SwiftTagSubItemDefinition("StartOfBlock", "Start of Block");
      MT380.U0004.Mandatory = false;
      MT380.U0003.Elements.Add((SwiftDefinitionElement) MT380.U0004);
      MT380.U0002.Elements.Add((SwiftDefinitionElement) MT380.U0003);
      MT380.U0005 = new SwiftTagDefinition("Reference_A_20C", "Reference");
      MT380.U0005.TagName = ":20C::";
      MT380.U0005.Multiple = true;
      MT380.U0006 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U0005.Elements.Add((SwiftDefinitionElement) MT380.U0006);
      MT380.U0007 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT380.U0005.Elements.Add((SwiftDefinitionElement) MT380.U0007);
      MT380.U0002.Elements.Add((SwiftDefinitionElement) MT380.U0005);
      MT380.U0008 = new SwiftTagDefinition("FunctionOfTheMessage_A_23G", "Function of the message");
      MT380.U0008.TagName = ":23G:";
      MT380.U000E = new SwiftTagSubItemDefinition("Function", "Function");
      MT380.U0008.Elements.Add((SwiftDefinitionElement) MT380.U000E);
      MT380.U000F = new SwiftTagSubItemDefinition("Subfunction", "Function Subfunction");
      MT380.U000F.Mandatory = false;
      MT380.U0010 = new SwiftTagSubItemDefinition("Subfunction_1", "Subfunction");
      MT380.U000F.Elements.Add((SwiftDefinitionElement) MT380.U0010);
      MT380.U0008.Elements.Add((SwiftDefinitionElement) MT380.U000F);
      MT380.U0002.Elements.Add((SwiftDefinitionElement) MT380.U0008);
      MT380.U0011 = new SwiftTagDefinition("Indicator_A_22H", "FX Order Transaction Type Indicator");
      MT380.U0011.TagName = ":22H::";
      MT380.U0011.Mandatory = false;
      MT380.U0012 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U0011.Elements.Add((SwiftDefinitionElement) MT380.U0012);
      MT380.U0013 = new SwiftTagSubItemDefinition("Indicator", "Indicator");
      MT380.U0011.Elements.Add((SwiftDefinitionElement) MT380.U0013);
      MT380.U0002.Elements.Add((SwiftDefinitionElement) MT380.U0011);
      MT380.U0014 = new SwiftTagSequenceDefinition("SequenceA1", "Linkages");
      MT380.U0014.Mandatory = false;
      MT380.U0014.Multiple = true;
      MT380.U0015 = new SwiftTagDefinition("StartOfBlock_A1_16R", "Start Of Block");
      MT380.U0015.TagName = ":16R:LINK";
      MT380.U0016 = new SwiftTagSubItemDefinition("StartOfBlock", "Start Of Block");
      MT380.U0016.Mandatory = false;
      MT380.U0015.Elements.Add((SwiftDefinitionElement) MT380.U0016);
      MT380.U0014.Elements.Add((SwiftDefinitionElement) MT380.U0015);
      MT380.U0017 = new SwiftTagChoiceDefinition("Choice", "");
      MT380.U0017.Mandatory = false;
      MT380.U0017.Multiple = true;
      MT380.U0018 = new SwiftTagDefinition("NumberIdentification_A1_13A", "Linked Message");
      MT380.U0018.TagName = ":13A::";
      MT380.U0018.Mandatory = false;
      MT380.U0019 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U0018.Elements.Add((SwiftDefinitionElement) MT380.U0019);
      MT380.U001A = new SwiftTagSubItemDefinition("NumberId", "Number Id");
      MT380.U0018.Elements.Add((SwiftDefinitionElement) MT380.U001A);
      MT380.U0017.Elements.Add((SwiftDefinitionElement) MT380.U0018);
      MT380.U001B = new SwiftTagDefinition("NumberIdentification_A1_13B", "Linked Message");
      MT380.U001B.TagName = ":13B::";
      MT380.U001B.Mandatory = false;
      MT380.U001C = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U001B.Elements.Add((SwiftDefinitionElement) MT380.U001C);
      MT380.U001D = new SwiftTagSubItemDefinition("DataSource", "Data Source Scheme");
      MT380.U001B.Elements.Add((SwiftDefinitionElement) MT380.U001D);
      MT380.U001E = new SwiftTagSubItemDefinition("Number_13B", "Number");
      MT380.U001B.Elements.Add((SwiftDefinitionElement) MT380.U001E);
      MT380.U0017.Elements.Add((SwiftDefinitionElement) MT380.U001B);
      MT380.U0014.Elements.Add((SwiftDefinitionElement) MT380.U0017);
      MT380.U001F = new SwiftTagDefinition("Reference_A1_20C", "Previous Reference");
      MT380.U001F.TagName = ":20C::";
      MT380.U007F = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U001F.Elements.Add((SwiftDefinitionElement) MT380.U007F);
      MT380.U0080 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT380.U001F.Elements.Add((SwiftDefinitionElement) MT380.U0080);
      MT380.U0014.Elements.Add((SwiftDefinitionElement) MT380.U001F);
      MT380.U0081 = new SwiftTagDefinition("EndOfBlock_A1_16S", "End Of Block");
      MT380.U0081.TagName = ":16S:LINK";
      MT380.U0082 = new SwiftTagSubItemDefinition("EndOfBlock", "End Of Block");
      MT380.U0082.Mandatory = false;
      MT380.U0081.Elements.Add((SwiftDefinitionElement) MT380.U0082);
      MT380.U0014.Elements.Add((SwiftDefinitionElement) MT380.U0081);
      MT380.U0002.Elements.Add((SwiftDefinitionElement) MT380.U0014);
      MT380.U0083 = new SwiftTagDefinition("EndOfBlock_A_16S", "End Of Block");
      MT380.U0083.TagName = ":16S:GENL";
      MT380.U0084 = new SwiftTagSubItemDefinition("EndOfBlock", "End Of Block");
      MT380.U0084.Mandatory = false;
      MT380.U0083.Elements.Add((SwiftDefinitionElement) MT380.U0084);
      MT380.U0002.Elements.Add((SwiftDefinitionElement) MT380.U0083);
      MT380.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT380.U0002);
      MT380.U0086 = new SwiftTagSequenceDefinition("SequenceB", "FX Order Details");
      MT380.U0087 = new SwiftTagDefinition("StartOfBlock_B_16R", "Start Of Block");
      MT380.U0087.TagName = ":16R:FXORDER";
      MT380.U0088 = new SwiftTagSubItemDefinition("StartOfBlock", "Start Of Block");
      MT380.U0088.Mandatory = false;
      MT380.U0087.Elements.Add((SwiftDefinitionElement) MT380.U0088);
      MT380.U0086.Elements.Add((SwiftDefinitionElement) MT380.U0087);
      MT380.U0089 = new SwiftTagDefinition("Indicator_B_22H", "Buy/Sell Indicator");
      MT380.U0089.TagName = ":22H::";
      MT380.U008A = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U0089.Elements.Add((SwiftDefinitionElement) MT380.U008A);
      MT380.U008B = new SwiftTagSubItemDefinition("Indicator", "Indicator");
      MT380.U0089.Elements.Add((SwiftDefinitionElement) MT380.U008B);
      MT380.U0086.Elements.Add((SwiftDefinitionElement) MT380.U0089);
      MT380.U008C = new SwiftTagChoiceDefinition("Choice", "");
      MT380.U008C.Multiple = true;
      MT380.U008D = new SwiftTagDefinition("Date_B_98A", "Date/Time");
      MT380.U008D.TagName = ":98A::";
      MT380.U008D.Multiple = true;
      MT380.U008E = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U008D.Elements.Add((SwiftDefinitionElement) MT380.U008E);
      MT380.U008F = new SwiftTagSubItemDefinition("Date", "Date");
      MT380.U008D.Elements.Add((SwiftDefinitionElement) MT380.U008F);
      MT380.U008C.Elements.Add((SwiftDefinitionElement) MT380.U008D);
      MT380.U0090 = new SwiftTagDefinition("DateTime_B_98C", "Date/Time");
      MT380.U0090.TagName = ":98C::";
      MT380.U0090.Multiple = true;
      MT380.U0091 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U0090.Elements.Add((SwiftDefinitionElement) MT380.U0091);
      MT380.U0092 = new SwiftTagSubItemDefinition("DateTime", "Date Time");
      MT380.U0093 = new SwiftTagSubItemDefinition("Date", "Date");
      MT380.U0092.Elements.Add((SwiftDefinitionElement) MT380.U0093);
      MT380.U0094 = new SwiftTagSubItemDefinition("Time", "Time");
      MT380.U0092.Elements.Add((SwiftDefinitionElement) MT380.U0094);
      MT380.U0090.Elements.Add((SwiftDefinitionElement) MT380.U0092);
      MT380.U008C.Elements.Add((SwiftDefinitionElement) MT380.U0090);
      MT380.U0086.Elements.Add((SwiftDefinitionElement) MT380.U008C);
      MT380.U0095 = new SwiftTagDefinition("Amount_B_19B", "Ordered Amount");
      MT380.U0095.TagName = ":19B::";
      MT380.U0096 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U0095.Elements.Add((SwiftDefinitionElement) MT380.U0096);
      MT380.U0097 = new SwiftTagSubItemDefinition("CurrencyCodeAmount", "Currency Code Amount");
      MT380.U0098 = new SwiftTagSubItemDefinition("CurrencyCode", "Currency Code");
      MT380.U0097.Elements.Add((SwiftDefinitionElement) MT380.U0098);
      MT380.U0099 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT380.U0097.Elements.Add((SwiftDefinitionElement) MT380.U0099);
      MT380.U0095.Elements.Add((SwiftDefinitionElement) MT380.U0097);
      MT380.U0086.Elements.Add((SwiftDefinitionElement) MT380.U0095);
      MT380.U009A = new SwiftTagDefinition("Currency_B_11A", "Counter Currency");
      MT380.U009A.TagName = ":11A::";
      MT380.U009B = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U009A.Elements.Add((SwiftDefinitionElement) MT380.U009B);
      MT380.U009C = new SwiftTagSubItemDefinition("CurrencyCode", "Currency Code");
      MT380.U009A.Elements.Add((SwiftDefinitionElement) MT380.U009C);
      MT380.U0086.Elements.Add((SwiftDefinitionElement) MT380.U009A);
      MT380.U009D = new SwiftTagSequenceDefinition("SequenceB1", "Parties");
      MT380.U009E = new SwiftTagDefinition("StartOfBlock_B1_16R", "Start Of Block");
      MT380.U009E.TagName = ":16R:ORDRPRTY";
      MT380.U009F = new SwiftTagSubItemDefinition("StartOfBlock", "Start Of Block");
      MT380.U009F.Mandatory = false;
      MT380.U009E.Elements.Add((SwiftDefinitionElement) MT380.U009F);
      MT380.U009D.Elements.Add((SwiftDefinitionElement) MT380.U009E);
      MT380.U0001U0002 = new SwiftTagChoiceDefinition("Choice", "");
      MT380.U0001U0002.Mandatory = false;
      MT380.U0001U0002.Multiple = true;
      MT380.U0002U0002 = new SwiftTagDefinition("Party_B1_95P", "Party");
      MT380.U0002U0002.TagName = ":95P::";
      MT380.U0003U0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U0002U0002.Elements.Add((SwiftDefinitionElement) MT380.U0003U0002);
      MT380.U0004U0002 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT380.U0002U0002.Elements.Add((SwiftDefinitionElement) MT380.U0004U0002);
      MT380.U0001U0002.Elements.Add((SwiftDefinitionElement) MT380.U0002U0002);
      MT380.U0005U0002 = new SwiftTagDefinition("Party_B1_95Q", "Party");
      MT380.U0005U0002.TagName = ":95Q::";
      MT380.U0006U0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U0005U0002.Elements.Add((SwiftDefinitionElement) MT380.U0006U0002);
      MT380.U0007U0002 = new SwiftTagSubItemDefinition("NameAndAddress_95Q", "Name And Address");
      MT380.U0005U0002.Elements.Add((SwiftDefinitionElement) MT380.U0007U0002);
      MT380.U0001U0002.Elements.Add((SwiftDefinitionElement) MT380.U0005U0002);
      MT380.U0008U0002 = new SwiftTagDefinition("Party_B1_95R", "");
      MT380.U0008U0002.TagName = ":95R::";
      MT380.U000EU0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U0008U0002.Elements.Add((SwiftDefinitionElement) MT380.U000EU0002);
      MT380.U000FU0002 = new SwiftTagSubItemDefinition("DataSourceScheme", "Data Source Scheme");
      MT380.U0008U0002.Elements.Add((SwiftDefinitionElement) MT380.U000FU0002);
      MT380.U0010U0002 = new SwiftTagSubItemDefinition("ProprietaryCode", "Proprietary Code");
      MT380.U0008U0002.Elements.Add((SwiftDefinitionElement) MT380.U0010U0002);
      MT380.U0001U0002.Elements.Add((SwiftDefinitionElement) MT380.U0008U0002);
      MT380.U009D.Elements.Add((SwiftDefinitionElement) MT380.U0001U0002);
      MT380.U0011U0002 = new SwiftTagDefinition("Account_B1_97A", "Safe Keeping Account");
      MT380.U0011U0002.TagName = ":97A::";
      MT380.U0012U0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT380.U0011U0002.Elements.Add((SwiftDefinitionElement) MT380.U0012U0002);
      MT380.U0013U0002 = new SwiftTagSubItemDefinition("AccountNumber", "Account Number");
      MT380.U0011U0002.Elements.Add((SwiftDefinitionElement) MT380.U0013U0002);
      MT380.U009D.Elements.Add((SwiftDefinitionElement) MT380.U0011U0002);
      MT380.U0014U0002 = new SwiftTagDefinition("EndOfBlock_B1_16S", "EndOfBlock");
      MT380.U0014U0002.TagName = ":16S:ORDRPRTY";
      MT380.U0015U0002 = new SwiftTagSubItemDefinition("EndOfBlock", "");
      MT380.U0015U0002.Mandatory = false;
      MT380.U0014U0002.Elements.Add((SwiftDefinitionElement) MT380.U0015U0002);
      MT380.U009D.Elements.Add((SwiftDefinitionElement) MT380.U0014U0002);
      MT380.U0086.Elements.Add((SwiftDefinitionElement) MT380.U009D);
      MT380.U0016U0002 = new SwiftTagDefinition("EndOfBlock_B_16S", "End Of Block");
      MT380.U0016U0002.TagName = ":16S:FXORDER";
      MT380.U0017U0002 = new SwiftTagSubItemDefinition("EndOfBlock", "End Of Block");
      MT380.U0017U0002.Mandatory = false;
      MT380.U0016U0002.Elements.Add((SwiftDefinitionElement) MT380.U0017U0002);
      MT380.U0086.Elements.Add((SwiftDefinitionElement) MT380.U0016U0002);
      MT380.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT380.U0086);
    }

    public class SequenceAClass : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT380.U0002;
        }
      }

      [Description("Start Of Block")]
      public Tag16R StartOfBlock_A_16R
      {
        get
        {
          return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0003);
        }
      }

      [Description("Start Of Block")]
      public Tag16R Tag16R_StartOfBlock_A
      {
        get
        {
          return this.StartOfBlock_A_16R;
        }
      }

      [Description("Reference")]
      public Tag20C[] Reference_A_20C
      {
        get
        {
          int index = -1;
          List<Tag20C> list = new List<Tag20C>();
          int count;
          do
          {
            ++index;
            Tag20C tag20C = new Tag20C((SwiftElement) this, index, (SwiftDefinitionElement) MT380.U0005);
            count = this.ListTags((SwiftElement) tag20C).Count;
            if (count > 0)
              list.Add(tag20C);
          }
          while (count > 0);
          return list.ToArray();
        }
      }

      [Description("Reference")]
      public Tag20C[] Tag20C_Reference_A
      {
        get
        {
          return this.Reference_A_20C;
        }
      }

      [Description("Function of the message")]
      public Tag23G FunctionOfTheMessage_A_23G
      {
        get
        {
          return new Tag23G((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0008);
        }
      }

      [Description("Function of the message")]
      public Tag23G Tag23G_FunctionOfTheMessage_A
      {
        get
        {
          return this.FunctionOfTheMessage_A_23G;
        }
      }

      [Description("FX Order Transaction Type Indicator")]
      public Tag22H Indicator_A_22H
      {
        get
        {
          return new Tag22H((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0011);
        }
      }

      [Description("FX Order Transaction Type Indicator")]
      public Tag22H Tag22H_Indicator_A
      {
        get
        {
          return this.Indicator_A_22H;
        }
      }

      [Description("Linkages")]
      public MT380.SequenceAClass.SequenceA1Class[] SequenceA1
      {
        get
        {
          int index = -1;
          List<MT380.SequenceAClass.SequenceA1Class> list = new List<MT380.SequenceAClass.SequenceA1Class>();
          int count;
          do
          {
            ++index;
            MT380.SequenceAClass.SequenceA1Class sequenceA1Class = new MT380.SequenceAClass.SequenceA1Class((SwiftElement) this, index, false);
            count = this.ListTags((SwiftElement) sequenceA1Class).Count;
            if (count > 0)
              list.Add(sequenceA1Class);
          }
          while (count > 0);
          return list.ToArray();
        }
      }

      [Description("End Of Block")]
      public Tag16S EndOfBlock_A_16S
      {
        get
        {
          return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0083);
        }
      }

      [Description("End Of Block")]
      public Tag16S Tag16S_EndOfBlock_A
      {
        get
        {
          return this.EndOfBlock_A_16S;
        }
      }

      internal SequenceAClass(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }

      public Tag20C AddReference_A_20C()
      {
        return new Tag20C((SwiftElement) this, this.Reference_A_20C.Length, (SwiftDefinitionElement) MT380.U0005)
        {
          Value = string.Empty
        };
      }

      public void RemoveReference_A_20C(Tag20C tag)
      {
        this.RemoveTag(tag.GetTag());
      }

      public MT380.SequenceAClass.SequenceA1Class AddSequenceA1()
      {
        return new MT380.SequenceAClass.SequenceA1Class((SwiftElement) this, this.SequenceA1.Length, true);
      }

      public void RemoveSequenceA1(MT380.SequenceAClass.SequenceA1Class sequence)
      {
        foreach (SwiftTag tag in this.ListTags((SwiftElement) sequence))
          this.RemoveTag(tag);
      }

      public class SequenceA1Class : SwiftTagSequence
      {
        internal override SwiftDefinitionElement Definition
        {
          get
          {
            return (SwiftDefinitionElement) MT380.U0014;
          }
        }

        [Description("Start Of Block")]
        public Tag16R StartOfBlock_A1_16R
        {
          get
          {
            return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0015);
          }
        }

        [Description("Start Of Block")]
        public Tag16R Tag16R_StartOfBlock_A1
        {
          get
          {
            return this.StartOfBlock_A1_16R;
          }
        }

        [Description("Linked Message")]
        public Tag13A NumberIdentification_A1_13A
        {
          get
          {
            return new Tag13A((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0018);
          }
        }

        [Description("Linked Message")]
        public Tag13A Tag13A_NumberIdentification_A1
        {
          get
          {
            return this.NumberIdentification_A1_13A;
          }
        }

        [Description("Linked Message")]
        public Tag13B NumberIdentification_A1_13B
        {
          get
          {
            return new Tag13B((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U001B);
          }
        }

        [Description("Linked Message")]
        public Tag13B Tag13B_NumberIdentification_A1
        {
          get
          {
            return this.NumberIdentification_A1_13B;
          }
        }

        [Description("Previous Reference")]
        public Tag20C Reference_A1_20C
        {
          get
          {
            return new Tag20C((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U001F);
          }
        }

        [Description("Previous Reference")]
        public Tag20C Tag20C_Reference_A1
        {
          get
          {
            return this.Reference_A1_20C;
          }
        }

        [Description("End Of Block")]
        public Tag16S EndOfBlock_A1_16S
        {
          get
          {
            return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0081);
          }
        }

        [Description("End Of Block")]
        public Tag16S Tag16S_EndOfBlock_A1
        {
          get
          {
            return this.EndOfBlock_A1_16S;
          }
        }

        internal SequenceA1Class(SwiftElement parent, int index, bool createTags)
          : base(parent, index, createTags)
        {
        }
      }
    }

    public class SequenceBClass : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT380.U0086;
        }
      }

      [Description("Start Of Block")]
      public Tag16R StartOfBlock_B_16R
      {
        get
        {
          return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0087);
        }
      }

      [Description("Start Of Block")]
      public Tag16R Tag16R_StartOfBlock_B
      {
        get
        {
          return this.StartOfBlock_B_16R;
        }
      }

      [Description("Buy/Sell Indicator")]
      public Tag22H Indicator_B_22H
      {
        get
        {
          return new Tag22H((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0089);
        }
      }

      [Description("Buy/Sell Indicator")]
      public Tag22H Tag22H_Indicator_B
      {
        get
        {
          return this.Indicator_B_22H;
        }
      }

      [Description("Date/Time")]
      public Tag98A[] Date_B_98A
      {
        get
        {
          int index = -1;
          List<Tag98A> list = new List<Tag98A>();
          int count;
          do
          {
            ++index;
            Tag98A tag98A = new Tag98A((SwiftElement) this, index, (SwiftDefinitionElement) MT380.U008D);
            count = this.ListTags((SwiftElement) tag98A).Count;
            if (count > 0)
              list.Add(tag98A);
          }
          while (count > 0);
          return list.ToArray();
        }
      }

      [Description("Date/Time")]
      public Tag98A[] Tag98A_Date_B
      {
        get
        {
          return this.Date_B_98A;
        }
      }

      [Description("Date/Time")]
      public Tag98C[] DateTime_B_98C
      {
        get
        {
          int index = -1;
          List<Tag98C> list = new List<Tag98C>();
          int count;
          do
          {
            ++index;
            Tag98C tag98C = new Tag98C((SwiftElement) this, index, (SwiftDefinitionElement) MT380.U0090);
            count = this.ListTags((SwiftElement) tag98C).Count;
            if (count > 0)
              list.Add(tag98C);
          }
          while (count > 0);
          return list.ToArray();
        }
      }

      [Description("Date/Time")]
      public Tag98C[] Tag98C_DateTime_B
      {
        get
        {
          return this.DateTime_B_98C;
        }
      }

      [Description("Ordered Amount")]
      public Tag19B Amount_B_19B
      {
        get
        {
          return new Tag19B((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0095);
        }
      }

      [Description("Ordered Amount")]
      public Tag19B Tag19B_Amount_B
      {
        get
        {
          return this.Amount_B_19B;
        }
      }

      [Description("Counter Currency")]
      public Tag11A Currency_B_11A
      {
        get
        {
          return new Tag11A((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U009A);
        }
      }

      [Description("Counter Currency")]
      public Tag11A Tag11A_Currency_B
      {
        get
        {
          return this.Currency_B_11A;
        }
      }

      [Description("Parties")]
      public MT380.SequenceBClass.SequenceB1Class SequenceB1
      {
        get
        {
          return new MT380.SequenceBClass.SequenceB1Class((SwiftElement) this, 0, false);
        }
      }

      [Description("End Of Block")]
      public Tag16S EndOfBlock_B_16S
      {
        get
        {
          return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0016U0002);
        }
      }

      [Description("End Of Block")]
      public Tag16S Tag16S_EndOfBlock_B
      {
        get
        {
          return this.EndOfBlock_B_16S;
        }
      }

      internal SequenceBClass(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }

      public Tag98A AddDate_B_98A()
      {
        return new Tag98A((SwiftElement) this, this.Date_B_98A.Length, (SwiftDefinitionElement) MT380.U008D)
        {
          Value = string.Empty
        };
      }

      public void RemoveDate_B_98A(Tag98A tag)
      {
        this.RemoveTag(tag.GetTag());
      }

      public Tag98C AddDateTime_B_98C()
      {
        return new Tag98C((SwiftElement) this, this.DateTime_B_98C.Length, (SwiftDefinitionElement) MT380.U0090)
        {
          Value = string.Empty
        };
      }

      public void RemoveDateTime_B_98C(Tag98C tag)
      {
        this.RemoveTag(tag.GetTag());
      }

      public class SequenceB1Class : SwiftTagSequence
      {
        internal override SwiftDefinitionElement Definition
        {
          get
          {
            return (SwiftDefinitionElement) MT380.U009D;
          }
        }

        [Description("Start Of Block")]
        public Tag16R StartOfBlock_B1_16R
        {
          get
          {
            return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U009E);
          }
        }

        [Description("Start Of Block")]
        public Tag16R Tag16R_StartOfBlock_B1
        {
          get
          {
            return this.StartOfBlock_B1_16R;
          }
        }

        [Description("Party")]
        public Tag95P Party_B1_95P
        {
          get
          {
            return new Tag95P((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0002U0002);
          }
        }

        [Description("Party")]
        public Tag95P Tag95P_Party_B1
        {
          get
          {
            return this.Party_B1_95P;
          }
        }

        [Description("Party")]
        public Tag95Q Party_B1_95Q
        {
          get
          {
            return new Tag95Q((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0005U0002);
          }
        }

        [Description("Party")]
        public Tag95Q Tag95Q_Party_B1
        {
          get
          {
            return this.Party_B1_95Q;
          }
        }

        [Description("")]
        public Tag95R Party_B1_95R
        {
          get
          {
            return new Tag95R((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0008U0002);
          }
        }

        [Description("")]
        public Tag95R Tag95R_Party_B1
        {
          get
          {
            return this.Party_B1_95R;
          }
        }

        [Description("Safe Keeping Account")]
        public Tag97A Account_B1_97A
        {
          get
          {
            return new Tag97A((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0011U0002);
          }
        }

        [Description("Safe Keeping Account")]
        public Tag97A Tag97A_Account_B1
        {
          get
          {
            return this.Account_B1_97A;
          }
        }

        [Description("EndOfBlock")]
        public Tag16S EndOfBlock_B1_16S
        {
          get
          {
            return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT380.U0014U0002);
          }
        }

        [Description("EndOfBlock")]
        public Tag16S Tag16S_EndOfBlock_B1
        {
          get
          {
            return this.EndOfBlock_B1_16S;
          }
        }

        internal SequenceB1Class(SwiftElement parent, int index, bool createTags)
          : base(parent, index, createTags)
        {
        }
      }
    }
  }
}
